<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png" />
    <HelloWorld msg="Welcome to Your Vue.js App" />
  </div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";

export default {
  name: "App",
  components: {
    HelloWorld,
  },
  data() {
    return {
      mm: 222
    }
  },
  created() {
    this.test();
    // 
    this.testLog()

  },
  methods: {
    async test() {
      await new Promise((resolve, reject) => {
        setTimeout(() => {
          reject("0000");
        }, 1000);
      });
    },
    testLog() {
      // 1. 字面量
      console.log(null);
      console.log(undefined);
      console.log(true,false);
      console.log(1,'number');
      console.log('name','string');
      console.log([1,2,3,4,45],'Array');
      console.log({a: 123},'Object');
      // 2. 变量
      let a = null
      let b = undefined
      let c = true
      let d = 1
      let e = 'name'
      let f = [12,3,2]
      let g = {a: 123}
      console.log(a);
      console.log(b);
      console.log(c);
      console.log(d);
      console.log(e);
      console.log(f);
      console.log(g.a,);
      console.log(this.mm,123,221);

    }
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
